package com.li.manage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.li.manage.dao.RoleMapper;
import com.li.manage.model.Role;
import com.li.manage.query.RoleQuery;
import com.li.manage.service.RoleService;

@Service
public class RoleServiceImpl implements RoleService {

	@Autowired
	private RoleMapper roleMapper;
	
	@Override
	public List<Role> getRoleList(RoleQuery roleQuery) {
		System.out.println("--------------我是改变的");
		System.out.println("--------------我是改变的");
		System.out.println("--------------我是改变的");
		return roleMapper.getRoleList(roleQuery);
	}

	@Override
	public Role getRoleByCode(String code) {
		return roleMapper.getRoleByCode(code);
	}

	@Override
	public String getMaxCode() {
		return roleMapper.getMaxCode();
	}

	@Override
	public void addRole(Role role) {
		roleMapper.insert(role);
	}

	@Override
	public void updateRoleByCode(Role role) {
		roleMapper.updateRoleByCode(role);
	}

	@Override
	public void deleteRoleByCode(String code) {
		roleMapper.deleteRoleByCode(code);
	}

}
